﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Linq;
using System.Linq;
using System.Data;

namespace DA
{
   public class bangdiemmonhoc_DA
    {
       DataLINQHocSinhDataContext ql = new DataLINQHocSinhDataContext();
       public object layallhs()
       {
           return ql.HOCSINHs.ToList();
       }
       public object layallmh()
       {
           return ql.MONHOCs.ToList();
       }
       public object layallml()
       {
           return ql.LOPs.ToList();
       }
       public object layallbd()
       {
           return ql.BANGDIEMs.ToList();
       }
       public object layalltheoma(BANGDIEM bd)
       {
           //dk la vay ak??dau rui??//tra ve datatable viet sao quen rui.haiz ko bit.quen me rui len mang serch da

     
               var query = from e in ql.BANGDIEMs
                       where e.MALOP==bd.MALOP&&e.MAMH==bd.MAMH&&e.MAHK==bd.MAHK
                       select new { e.HOCSINH.TENHS,e.D15,e.D1T,e.DTB};
           return query.ToList();
       }
      
    }
}
